package operation

import (
	"jtvss/api/operation/controller"
	"jtvss/api/operation/model"
	"jtvss/pkg/ctx"
	"jtvss/pkg/orm"

	"github.com/gin-gonic/gin"
)

// init 初始化
func init() {
	orm.RegisterModel(
		&model.Station{},
		&model.Organization{},
		&model.Vehicle{},
	)
	ctx.RegisterJWT("/operation", func(r *gin.RouterGroup) {
		controller.Station{}.Routers(r.Group("/station"))
		controller.Organization{}.Routers(r.Group("/org"))
		controller.Fleet{}.Routers(r.Group("/fleet"))
		controller.Vehicle{}.Routers(r.Group("/vehicle"))
	})
}
